package router

import (
	"YingShop/controller"
	"YingShop/middleware"

	"github.com/gin-gonic/gin"
)

func ShopOrderRouter(e *gin.Engine) {
	shopOrderRoute := e.Group("/order")
	shopOrderRoute.Use(middleware.LoginMiddleWare())
	shopOrderRoute.GET("/:orderId", controller.ShopOrderController{}.Get)
	shopOrderRoute.POST("", controller.ShopOrderController{}.Post)
	shopOrderRoute.POST("/pay/:orderId", controller.ShopOrderController{}.Pay)
	shopOrderRoute.POST("/accept/:orderId", controller.ShopOrderController{}.Accept)
	shopOrderRoute.POST("/making/:orderId", controller.ShopOrderController{}.Making)
	shopOrderRoute.POST("/ready/:orderId", controller.ShopOrderController{}.Ready)
	shopOrderRoute.POST("/finish/:orderId", controller.ShopOrderController{}.Finish)
}
